#include "Params.h"
#include "Vector2.h"

const int Params::RedKickOffRegion[] = { 3, 7, 5, 20 };
const int Params::RedDefRegion[] = { 3, 4, 5, 7 };
const int Params::RedAttRegion[] = { 12, 7 , 14, 13 };
const int Params::BlueKickOffRegion[] = { 14, 10, 12, 20 };
const int Params::BlueDefRegion[] = { 14, 13, 12, 10 };
const int Params::BlueAttRegion[] = { 5, 10, 3, 4 };

const float Params::GameUpdateTime = 1.f / 60.f;

float	Params::GameTimeFactor = 18.f;
int		Params::MatchMode = Params::AIvsAI;
int		Params::InputMode = Params::Keyboard;
int		Params::ScreenMode = Params::Window;

//Ball's params
const float Params::BallPassSpeed = 2.5f;//3.0f;
const float Params::BallShotSpeed = 4.0f;//5.0f;
const float Params::BallSpeedAttenuation = 0.995f;
const int	Params::BallCaptureRange = 8;

const int	Params::TackleRange = 15;

//GoaKeeper's params
const float Params::GKMaxSpeed = .8f;
const int	Params::GKBallCaptureRange = 10;
const float	Params::GKSafenessRange = 50.f;

//FieldPlayer's params
const float Params::PlayerMaxSpeed = 1.0f;//1.5f;
const float Params::PlayerMaxSpeedWithBall = .9f;//1.0f;
const float	Params::PlayerSafenessRange = 40.f;
const float Params::PlayerTooShortPassRange = 25.f;
const float Params::PlayerShotRange = 200.f;
const float	Params::DodgeRange = 11.f;

//User Controlled Player's params
const int	Params::UserControlledBallCaptureRange = Params::BallCaptureRange + 3;
const int	Params::UserControlledTackleRange = Params::TackleRange + 5;

//We find cos(a). |a| is the angle where an enemy can intercept a pass. 
//Only regarding pass direction. 
const float Params::PassInterceptRange = 0.8f*Params::BallPassSpeed / Vector2(Params::BallPassSpeed,Params::PlayerMaxSpeed).Length();

//We find cos(a). |a| is the angle where an enemy can intercept a shot. 
//Only regarding shot direction. 
const float Params::ShotInterceptRange = Params::BallShotSpeed / Vector2(Params::BallShotSpeed,Params::PlayerMaxSpeed).Length();

const float Params::HotRegion = 200.f;